﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ly2
{
    class Computer
    {
        public string brand { get; set; }
        public IUSB usb1 { get; set; }
        public IUSB usb2 { get; set; }

        public Computer()
        {
        }
        public Computer(string brand, IUSB usb1, IUSB usb2)
        {
            this.brand = brand;
            this.usb1 = usb1;
            this.usb2 = usb2;
        }

        public void Open()
        {
            Console.WriteLine("{0}电脑启动...", brand);
        }
        public void Read()
        {
            this.usb1.Read();
            this.usb2.Read();
        }
        public void Write()
        {
            this.usb1.Write();
            this.usb2.Write();
        }
        public void Close()
        {
            Console.WriteLine("{0}电脑关闭...", brand);
        }




    }
}
